﻿cmake_minimum_required(VERSION 3.20)

project(FreeRTOS)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

#set(CMAKE_CXX_STANDARD 17)
#set(CMAKE_CXX_STANDARD_REQUIRED ON)

file(GLOB SourceFiles ${SourceFileTypes})
file(GLOB OtherSourceFiles ${CMAKE_CURRENT_SOURCE_DIR}/portable/**/*.c )
add_library(${PROJECT_NAME} STATIC
        portable/MSVC-MingW/portmacro.h
        portable/MSVC-MingW/port.c
        ${SourceFiles}
        ${OtherSourceFiles}
        )

INSTALL(TARGETS ${PROJECT_NAME}
        RUNTIME DESTINATION bin
        ARCHIVE DESTINATION lib
        )

target_link_libraries(${PROJECT_NAME}
        PRIVATE
        )

target_include_directories(${PROJECT_NAME} PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/portable/MSVC-MingW>
        $<INSTALL_INTERFACE:include>  # <prefix>/include
        )
